import React, { useEffect, useState } from "react";
import {
  Form,
  Input,
  Button,
  Dialog,
  Checkbox,
  Space,
  DatePicker,
  Toast,
} from "antd-mobile";
import { FormInstance } from "antd-mobile/es/components/form";
import dayjs from "dayjs";
import { CloseCircleFill } from "antd-mobile-icons";
import { useNavigate } from "react-router-dom";

import "./index.css";
const Index: React.FC = () => {
  const [form] = Form.useForm();
  const onSubmit = () => {
    let values = form.getFieldsValue();
    console.log(values.txt);
    values.txt=''
  };
  return (
    <div className="wrap">
      <div className="wraptop">客服</div>
      <div className="wrapbutton">
        <Form
          form={form}
          initialValues={{
            c: "",
          }}
          footer={
            <Button block color="primary" onClick={onSubmit} size="large">
              发送
            </Button>
          }
        >
          <Form.Item name="txt" label="输入发送的内容">
            <Input placeholder="输入发送的内容" />
          </Form.Item>
        </Form>
      </div>
    </div>
  );
};
export default Index;
